package com.zk.spring5.bean;

import java.util.Objects;

/**
 * @author ZK
 * @Description
 * @time 2021/5/6 9:30
 * @note
 */
public class User {
    private Integer userId;
    private String username;
    private String status;

    public User() {
    }

    public User(Integer userId, String username, String status) {
        this.userId = userId;
        this.username = username;
        this.status = status;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof User)) {
            return false;
        }
        User user = (User) o;
        return Objects.equals(getUserId(), user.getUserId()) && Objects.equals(getUsername(), user.getUsername()) && Objects.equals(getStatus(), user.getStatus());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getUserId(), getUsername(), getStatus());
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                ", status='" + status + '\'' +
                '}';
    }
}
